package com.njbdqn.myfilm.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.njbdqn.myfilm.componses.PageBean;
import com.njbdqn.myfilm.componses.PageParam;
import com.njbdqn.myfilm.dao.DisplayDAO;
import com.njbdqn.myfilm.vo.Display;

@Service
@Transactional
public class DisplayService {
	@Autowired
	private DisplayDAO ddao;
	@Autowired
	private PageBean<Display> pb;
	
	public PageBean<Display> getBean(PageParam pip){
		pb.setPip(pip);
		return pb.openBean();
	}
	
	public List<Display> findAllActor(){
		return ddao.findAllActor();
	}
	
	public List<Display> findAllFilm(){
		return ddao.findAllFilm();
	}
	
	public void saveFilm(List<Display> displays){
		ddao.save(displays);
	}
}
